/*  
Theme Name:   Apple4us
Theme URI:    http://apple4.us/theme
Description:  Apple4us' default theme.
Author:       apple4us
Author URI:   http://apple4.us/
Version:      0.1.0
*/

@import "reset.scss";
@import "predef.scss";

/* General */
body {
  font-family: $primary_font_family;
  font-size: 75%;
  line-height: 160%;
  color: $primary_text_color;
  background-color: #fff;
}
code,
pre {
  background: $code_block_bg_color;
  font-family: $code_font_family;
  padding: .5em;
}
a {
  text-decoration: none;
  outline: none;
  color: #39f;
  @include transition(color);

  &:hover {
    color: #f90;
  }
}

hr {
  background-color: $primary_border_color;
  border: 0;
  height: 1px;
  margin: 10px 0;
}

/* Forms */

form {
  input[type="text"], 
  textarea {
    border: $secondary_border_style;
    color: $primary_text_color;
    outline-color: #9ce;
    padding: 4px;
    @include rounded_corners(4px);
    @include box_shadow;
    @include transition(outline);
  }

  input.a4u-text:focus,
  text-area:focus {
    border-color: #69b;
  }
  
  textarea {
    height: 90px;
    width: 400px;
  }

  p {
    padding-bottom: .25em;
  }
}

/* Layout */
.a4u-doc {
  text-align: center;
}

.a4u-section {
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  text-align: left;
  width: 900px;
}

.a4u-main {
  border: $primary_border_style;
  margin: 20px auto;
  padding: 20px;
  @include rounded_corners(20px);
}

.a4u-content {
  border-right: $primary_border_style;
  float: left;
  overflow: hidden;
  padding-top: 1px;
  padding-right: 20px;
  width: 519px;
}

.a4u-sidebars {
  float: right;
  overflow: hidden;
  width: 360px;
}

.a4u-sidebar {
  float: left;
  overflow: hidden;
  width: 160px;
  padding-left: 20px;
  padding-top: 10px;
}

/* Header */
.a4u-header {
  @include bg_gradient;
  @include header_box_shadow;
  height: 48px;

  .a4u-section {
    height: 100%;
  }

  a, 
  a:visited,
  a:hover,
  a:active {
    color: #fff;
  }

  h1 {
    background: url(static/logo.png);
    height: 24px;
    left: 0;
    padding: 0;
    position: absolute;
    top: 10px;
    width: 96px;

    a {
      display: block;
      height: 100%;
      outline: none;
      text-indent: -99999px;
      width: 100%;
    }
  }

  .a4u-search {
    position: absolute;
    right: 0;
    top: 15px;
    width: 175px;
    height: 20px;
  }

  input.a4u-search-input {
    border: none;
    height: 20px;
    outline: none;
    padding: 0 5px 0 22px;
    position: absolute;
    width: 143px;
    @include rounded_corners(10px);
    @include box_shadow;
    

    &:focus {
      @include box_shadow_focused; 
    }
  }

  .a4u-search-button {
    background: url(static/search.png) no-repeat 0% 0%;
    border: 0;
    cursor: pointer;
    height: 13px;
    left: 5px;
    margin: 0px;
    padding: 0;
    position: absolute;
    text-indent: -9999px;
    top: 3px;
    width: 13px
  }
}

/* Content */
.a4u-entry {
  margin-bottom: 30px;
  overflow: hidden;
  width: 100%;

  .a4u-entry-header {
    margin-bottom: 10px;
    padding-left: 42px;
    position: relative; 

    h2 {
      border-bottom: $primary_border_style;
      font-size: 133%;
      padding-bottom: 0;

      a {
        color: #06c;

        &:hover {
          color: #f90;
        }
      }
    }
  }

  .a4u-entry-date {
    border-right: $auxillary_border_style;
    height: 36px;
    left: 0;
    position: absolute;
    text-align: center;
    top: 0;
    width: 36px;
  }

  .a4u-entry-day {
    color: #ccc;
    font-size: 150%;
    font-weight: bold;
    height: 1.33em;
    line-height: 1.33;
    padding-top: 1px;
  }

  .a4u-entry-month{
    color: #999;
    font-size: 11px;
    margin: 4px 0 0;
  }

  .a4u-entry-meta {
    font-size: 92%;
  }

  .a4u-entry-content {
    font-size: 117%;
    line-height: 160%;

    a {
      color: #18f;
      @include transition(text-decoration);

      &:hover {
        text-decoration: underline;
      }

      img {
        border: $primary_border_style;
        padding: 2px;
        @include transition(border-color);
      }

      &:hover img {
        border-color: #06c;
      }
    }

    h3,
    h4,
    h5,
    h6,
    p,
    blockquote,
    fieldset,
    ul,
    ol,
    dl {
      margin: 0;
      padding-bottom: .75em;
    }

    blockquote {
      background-color: #fbfbf9;
      border: $auxillary_border_style;
      border-width: 1px 1px 1px 5px;
      margin: 15px 30px 0 10px;
      padding-left: 10px;
    }

    h3 {
        font-size: 133%;
    }

    h4,
    h5,
    h6 {
      font-size: 100%;
    }

    u {
      background: #f2f2f2;
      color: $primary_text_color;
      display: block;
      padding: 10px;
      text-decoration: none;
    }
  }
}


/* Sidebar */
.a4u-sidebar {
  color: $secondary_text_color;
  @include transition(color);

  a {
    color: $secondary_text_color;
    @include transition(color);
  }

  h3 {
    background: #eee;
    display: block;
    font-size: 117%;
    margin-bottom: 5px;
    padding: 0 2px;
    @include rounded_corners(4px);
  }

  ul, ol, li {
    list-style: none;
  }

  ul li {
    @include transition(background);

    &:hover {
      background-color: #f2f2f2;
      color: #000;

      & a {
        color: #06c;
      }
    }

    border-top: $primary_border_style;
    cursor: default;
    padding: 4px 5px;

    &:first-child {
      border-top: none;
    }

    .entry-content, 
    .entry-meta {
      display: block;
    }

    .entry-meta {
      font-size: 92%;
    }
  }

  .a4u-widget {
    margin-bottom: 20px;
  }
}


/* Comments */
.a4u-comments {
  margin-bottom: 20px;

  .a4u-comment {
    padding-left: 50px;
    position: relative;

    .a4u-avatar {
      left: 0;
      position: absolute;
      top: 0;
    }

    .a4u-comment-content {
      background: #e1f1ff;
      padding: 5px;
      p {
        padding: 0;
      }
    }

    .a4u-comment-meta {
      color: $primary_text_color;
    }
  }
}

/* Hacks*/
.a4u-widget {
  .entry-content a,
  .entry-meta a {
    color: $primary_text_color;
  }
}

.a4u-about {
  padding: 0;

  ol {
    border: $primary_border_style;
    margin-bottom: 20px;
    padding: 0;
    @include rounded_corners(4px);
    @include box_shadow;

    li {
      border-top: $primary_border_style;
      opacity: .75;
      @include transition(opacity);

      &:hover {
        opacity: 1;
      }

      a {
        display: block;
        height: 100%;
        outline: none;
        text-indent: -2012px;
      }

      &:first-child {
        border-top: none;
        @include rounded_top_corners(3px);
      }

      &:last-child {
        @include rounded_bottom_corners(3px);
      }
    }
  }

}

.comment-author-gravatar {
  float: left;
  height: 32px;
  width: 32px;
  margin: 0 5px 5px 0;
}
.comment-meta,
.comment-post-title,
.comment-text {
  display: block;
}
.comment-post-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.comment-author,
.comment-post-title {
  color: $primary_text_color;
}
ul li.recent-comment:hover a {
  color: $secondary_text_color;

  .comment-author,
  .comment-post-title {
    color: #06c;
  }
}

/* Footer */
.a4u-footer {
  padding-bottom: 2em;
}

/* Editorial content */
.a4u-about {
  ol li {
    background: url(static/editorial.png) top center no-repeat;
  }

  // CSS sprites
  .a4u-feed {
    background-position: center 0;
    height: 66px;
  }

  .a4u-email {
    background-position: center -66px;
    height: 28px;
  }

  .a4u-ads-dacode {
    background-position: center -94px;
    height: 178px;
  }

  .a4u-ads-dacodestore {
    background-position: center -272px;
    height: 27px;
  }

  .a4u-special-future-of-reading {
    background-position: center -299px;
    height: 59px;
  }

  .a4u-special-setup {
    background-position: center -358px;
    height: 59px;
  }

  .a4u-special-revolution {
    background-position: center -417px;
    height: 59px;
  }

  .a4u-special-dev {
    background-position: center -476px;
    height: 59px;
  }
}
